package com.douding.file.controller.admin;

import com.douding.server.dto.PageDto;
import com.douding.server.dto.ResponseDto;
import com.douding.server.service.FileService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin/file")
public class FileController {

    @Resource
    private FileService fileService;

    @RequestMapping("/list")
    public ResponseDto list(PageDto pageDto) {
        ResponseDto<PageDto> responseDto = new ResponseDto<>();
        fileService.list(pageDto);
        responseDto.setContent(pageDto);
        return responseDto;
    }

}
